package com.xinzhitong.www.service;

import com.xinzhitong.www.exception.ReceiptPlaceException;
import com.xinzhitong.www.pojo.ReceiptPlace;

import java.util.List;

/**
 * 收货地址服务
 *
 * @author 徐鑫
 */
public interface ReceiptPlaceService {

    /**
     * 获取用户的所有收货地址
     *
     * @return 收货地址列表
     * @throws ReceiptPlaceException 收货地址异常
     */
    List<ReceiptPlace> getUsersReceiptPlaces() throws ReceiptPlaceException;

    /**
     * 添加一个收货地址
     *
     * @param receiptPlace 收货地址
     * @throws ReceiptPlaceException 收货地址异常
     */
    void addAReceiptPlace(ReceiptPlace receiptPlace) throws ReceiptPlaceException;

    /**
     * 获取某用户下的指定的收货地址
     *
     * @param id 收货地址id
     * @return 收货地址信息
     * @throws ReceiptPlaceException 收货地址异常
     */
    ReceiptPlace getTheReceiptPlaceOf(Integer id) throws ReceiptPlaceException;

    /**
     * 编辑收货地址
     *
     * @param receiptPlace 收货地址信息
     * @throws ReceiptPlaceException 收货地址异常
     */
    void editTheReceiptPlace(ReceiptPlace receiptPlace) throws ReceiptPlaceException;

    /**
     * 删除收货地址
     *
     * @param ids 收货地址id列表
     * @throws ReceiptPlaceException 收货地址异常
     */
    void deleteTheReceiptPlaceIn(Integer[] ids) throws ReceiptPlaceException;

}
